﻿using System;
using System.Linq;

class PrintMatrixesC
{
    static void Main()
    {

        int matrixSize = int.Parse(Console.ReadLine());
        int[,] matrix = new int[matrixSize, matrixSize];
        int currentElement = 1;

        //fill in numbers which are under(left) the big diagonal (top left to bottom right), e.g. left part of the matrix
        for (int row = matrix.GetLength(0) - 1; row >= 0; row--)
        {
            int diagonalColumn = 0;
            for (int diagonalPoint = row; diagonalPoint < matrix.GetLength(0); diagonalPoint++)
            {
                matrix[diagonalPoint, diagonalColumn] = currentElement;
                diagonalColumn++;
                currentElement++;
                
            }
        }

        //fill in numbers which are above(right) the big diagonal (top left to bottom right), e.g. right part of the matrix
        for (int column = 1; column < matrix.GetLength(1); column++)
        {
            int diagonalRow = 0;
            for (int diagonalPoint = column; diagonalPoint < matrix.GetLength(0); diagonalPoint++)
            {
                matrix[diagonalRow, diagonalPoint] = currentElement;
                diagonalRow++;
                currentElement++;

            }
        }

        //print matrix
        for (int row = 0; row < matrix.GetLength(0); row++)
        {
            for (int col = 0; col < matrix.GetLength(1); col++)
            {
                Console.Write("{0}\t",matrix[row,col]);

            }
            Console.WriteLine();

        }
    }
}